import styles from './index.module.less';
import { Button, Upload } from 'antd';
import { UploadOutlined } from '@ant-design/icons';

const Index = () => {
  const handlerCustomRequest = (e) => {
    window.api.uploadFile(e.file.path);
  };

  return (
    <div className={styles.container}>
      <Upload customRequest={handlerCustomRequest}>
        <Button type='primary' icon={<UploadOutlined />}>上传</Button>
      </Upload>
    </div>
  )
}

export default Index;
